Skip to content

feat(ai-gateway): prepare Vercel model provider options#4582

Open
chrarnoldus wants to merge 6 commits into
mainfrom
feat/vercel-model-provider-options
Open

feat(ai-gateway): prepare Vercel model provider options#4582
chrarnoldus wants to merge 6 commits into
mainfrom
feat/vercel-model-provider-options

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Vercel provider-option generation for Anthropic and OpenAI model variants
  • translate chat and Responses API verbosity into Anthropic effort options
  • prepare Anthropic speed: fast and OpenAI reasoningMode: pro options for future model routing support
  • centralize model variant detection in shared provider helpers and extend the Vercel provider-option types
  • add focused coverage for provider-option generation

This PR intentionally does not map Opus fast or GPT Pro model IDs to base Vercel model IDs yet. That routing can be enabled separately once the model-name behavior is ready to ship.

Verification

  • pnpm --filter web test -- --runInBand src/lib/ai-gateway/providers/vercel/index.test.ts src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.test.ts
  • pnpm --filter web typecheck
  • pnpm exec oxfmt --check apps/web/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.ts apps/web/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.test.ts
  • git diff --check

@chrarnoldus chrarnoldus self-assigned this Jul 16, 2026
@chrarnoldus chrarnoldus changed the title feat(ai-gateway): support Vercel model options feat(ai-gateway): route fast Opus and GPT Pro through Vercel Jul 16, 2026
@chrarnoldus chrarnoldus changed the title feat(ai-gateway): route fast Opus and GPT Pro through Vercel feat(ai-gateway): prepare Vercel model provider options Jul 17, 2026
@chrarnoldus
chrarnoldus marked this pull request as ready for review July 17, 2026 19:06
@kilo-code-bot

kilo-code-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the Vercel provider-option prep for Anthropic/OpenAI model variants; the refactor is logically sound, the mapModelIdToVercel edits net to a clean no-op across commits, and behavior is covered by the added tests, so no high-confidence issues were found in the changed code.

Files Reviewed (5 files)
  • apps/web/src/lib/ai-gateway/providers/anthropic.constants.ts
  • apps/web/src/lib/ai-gateway/providers/openai.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/types.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts

Reviewed by claude-sonnet-5 · Input: 36 · Output: 11.2K · Cached: 883.4K

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants